package com.d0312;

public class Outerclass1 {
    private String name;
    private int age;

    public void show(){//方法的参数a，要求是final常量
        class InnerClass{
            public InnerClass(){
                name="john";
            }
            public void display(){
                System.out.println(name+"\t"+age);
            }
        }
        InnerClass innerClass = new InnerClass();
        innerClass.display();
    }

    public static void main(String[] args) {
        Outerclass1 outerclass1= new Outerclass1();
        outerclass1.show();
    }
}
